<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>数组变化发视图更新成功</title>
  <script type="text/javascript" src="vue.js"></script>
</head>
<body>
  <div id="app">
    <p>
      <button v-on:click="handler_1">修改数组元素</button>
    </p>
    <p v-for="item in list" :key="item.id">
      <input type="checkbox"> {{item.name}}
    </p>
  </div>

  <script>
    var vm = new Vue({
      el: '#app',
      data: {
        list:  [
          {id:1 , name: 'JavaScript'},
          {id:2 , name: 'HTML'},
          {id:3 , name: 'CSS'}
        ]
      },
      methods: {
        handler_1() {
          this.list[1].name = 'Python'; //可以触发更新
        }
      }
    })
  </script>
</body>
</html>
